<%@ taglib prefix="s" uri="/struts-tags" %>
<%--
  Created by IntelliJ IDEA.
  User: wurenjie
  Date: 15/5/23
  Time: 11:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title><s:property value="title"/> | 历史记录</title>
    <s:include value="head.jsp" />
    <style>
        .content-wrap{
            position: fixed;width: 940px;height: 580px;z-index: 2; background-color: white;border: solid 3px black;
            display: none;
        }
        .content-close{
            cursor: pointer;font-size: 30px;padding: 10px;
        }
        .content-c{
            width: 920px;margin-left: 10px;height: 460px;overflow: auto;
        }
        .content-s{
            width: 920px;margin-left: 10px;height: 460px;overflow: auto;
            display: none;
        }
    </style>
</head>
<body>
    <div class="content-wrap" id="content-wrap">
        <div class="pull-right content-close" onclick="closewrap();">&times;</div>
        <div class="content-c" id="content-c">
            <div class="pull-right">
                <img class="pull-left" src="" height="50" width="50" alt="avatar" style="margin-top: 20px;" id="h-avatar">
                <div class="pull-left">
                <h3>&nbsp;&nbsp;<span id="h-uname">编辑者</span></h3>
                <p>&nbsp;&nbsp;编辑于：<span id="h-edittime"></span></p>
                </div>
            </div>
            <button class="btn" onclick="showsource()">显示源代码</button>
            <h1 id="h-title">:TITLE</h1>
            <hr>
            <div id="h-c">
                :CONTENT
            </div>
            <p>&nbsp;</p>
            <div class="alert alert-warning">修改原因：<span id="h-reason"></span></div>
        </div>
        <div class="content-s" id="content-s">
            <p><button class="btn" onclick="hidesource()">返回预览</button></p>
            <p><textarea cols="120" rows="19" title="源代码" id="h-source"></textarea></p>
        </div>

    </div>
    <div class="body-container">
        <s:include value="header.jsp" />
        <div class="wiki-history">
            <h1><s:property value="title"/> 编辑记录</h1>
            <hr>
            <p><a href="/wiki/<s:property value="title"/>">返回Wiki页</a> </p>
            <div class="history-container">
                <strong>最近更改:</strong>
                <div class="history-list">
                    <table class="table table-hover">
                        <s:iterator value="histories" id="it" status="st">
                        <tr><td>
                            <div class="btn-detail" onclick="showDetail(<s:property value="#it.id"/>)">
                                <img src="<s:action name="getavatar" executeResult="true" ignoreContextParams="true">
                                <s:param name="uid" value="#it.author"/></s:action>" alt="avatar" height="50px" width="50px">
                                <div class="history-detail">
                                    <strong>
                                        <s:action name="getusername" executeResult="true" ignoreContextParams="true">
                                        <s:param name="uid" value="#it.author"/></s:action>
                                    </strong>
                                    <span><s:property value="sdf.format(#it.editTime)"/> </span>
                                    <div class="clear"></div>
                                    <p><i>(<s:property value="#it.title"/>)</i> <s:property value="#it.reason"/> </p>
                                </div>
                            </div>
                        </td></tr>
                        </s:iterator>
                    </table>
                </div>
            </div>
        </div>
        <s:include value="footer.jsp" />
    </div>
    <script src="/Public/js/jquery.min.js"></script>
    <script src="/Public/js/bootstrap.min.js"></script>
    <script src="/Public/js/jquery.feelywikicode.min.js"></script>
    <script src="/Public/js/main.js"></script>
    <script src="/Public/js/history.js"></script>
</body>
</html>
